\(\int \frac {\text {csch}^3(c+d x)}{(a+b \tanh ^2(c+d x))^2} \, dx\) [39]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 23, antiderivative size = 141 \[ \int \frac {\text {csch}^3(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^2} \, dx=\frac {(a+4 b) \text {arctanh}(\cosh (c+d x))}{2 a^3 d}-\frac {\sqrt {b} (3 a+4 b) \text {arctanh}\left (\frac {\sqrt {b} \text {sech}(c+d x)}{\sqrt {a+b}}\right )}{2 a^3 \sqrt {a+b} d}-\frac {\coth (c+d x) \text {csch}(c+d x)}{2 a d \left (a+b-b \text {sech}^2(c+d x)\right )}-\frac {b \text {sech}(c+d x)}{a^2 d \left (a+b-b \text {sech}^2(c+d x)\right )} \]

[Out]

1/2*(a+4*b)*arctanh(cosh(d*x+c))/a^3/d-1/2*coth(d*x+c)*csch(d*x+c)/a/d/(a+b-b*sech(d*x+c)^2)-b*sech(d*x+c)/a^2
/d/(a+b-b*sech(d*x+c)^2)-1/2*(3*a+4*b)*arctanh(sech(d*x+c)*b^(1/2)/(a+b)^(1/2))*b^(1/2)/a^3/d/(a+b)^(1/2)

Rubi [A] (verified)

Time = 0.16 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3745, 482, 541, 536, 213, 214} \[ \int \frac {\text {csch}^3(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^2} \, dx=\frac {(a+4 b) \text {arctanh}(\cosh (c+d x))}{2 a^3 d}-\frac {\sqrt {b} (3 a+4 b) \text {arctanh}\left (\frac {\sqrt {b} \text {sech}(c+d x)}{\sqrt {a+b}}\right )}{2 a^3 d \sqrt {a+b}}-\frac {b \text {sech}(c+d x)}{a^2 d \left (a-b \text {sech}^2(c+d x)+b\right )}-\frac {\coth (c+d x) \text {csch}(c+d x)}{2 a d \left (a-b \text {sech}^2(c+d x)+b\right )} \]

[In]

Int[Csch[c + d*x]^3/(a + b*Tanh[c + d*x]^2)^2,x]

[Out]

((a + 4*b)*ArcTanh[Cosh[c + d*x]])/(2*a^3*d) - (Sqrt[b]*(3*a + 4*b)*ArcTanh[(Sqrt[b]*Sech[c + d*x])/Sqrt[a + b
]])/(2*a^3*Sqrt[a + b]*d) - (Coth[c + d*x]*Csch[c + d*x])/(2*a*d*(a + b - b*Sech[c + d*x]^2)) - (b*Sech[c + d*
x])/(a^2*d*(a + b - b*Sech[c + d*x]^2))

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 482

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[e^(n - 1
)*(e*x)^(m - n + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(n*(b*c - a*d)*(p + 1))), x] - Dist[e^n/(n*(b*c -
 a*d)*(p + 1)), Int[(e*x)^(m - n)*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(m - n + 1) + d*(m + n*(p + q + 1)
+ 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && LtQ[p, -1] && GeQ[n
, m - n + 1] && GtQ[m - n + 1, 0] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 536

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 541

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)), x_Symbol] :> Simp[(
-(b*e - a*f))*x*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(a*n*(b*c - a*d)*(p + 1))), x] + Dist[1/(a*n*(b*c - a
*d)*(p + 1)), Int[(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(b*e - a*f) + e*n*(b*c - a*d)*(p + 1) + d*(b*e - a*
f)*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, q}, x] && LtQ[p, -1]

Rule 3745

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Sec[e + f*x], x]}, Dist[1/(f*ff^m), Subst[Int[(-1 + ff^2*x^2)^((m - 1)/2)*((a - b + b*ff^2*x^2)^p/x^(m
 + 1)), x], x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \frac {x^2}{\left (-1+x^2\right )^2 \left (a+b-b x^2\right )^2} \, dx,x,\text {sech}(c+d x)\right )}{d} \\ & = -\frac {\coth (c+d x) \text {csch}(c+d x)}{2 a d \left (a+b-b \text {sech}^2(c+d x)\right )}-\frac {\text {Subst}\left (\int \frac {a+b+3 b x^2}{\left (-1+x^2\right ) \left (a+b-b x^2\right )^2} \, dx,x,\text {sech}(c+d x)\right )}{2 a d} \\ & = -\frac {\coth (c+d x) \text {csch}(c+d x)}{2 a d \left (a+b-b \text {sech}^2(c+d x)\right )}-\frac {b \text {sech}(c+d x)}{a^2 d \left (a+b-b \text {sech}^2(c+d x)\right )}-\frac {\text {Subst}\left (\int \frac {2 (a+b) (a+2 b)+4 b (a+b) x^2}{\left (-1+x^2\right ) \left (a+b-b x^2\right )} \, dx,x,\text {sech}(c+d x)\right )}{4 a^2 (a+b) d} \\ & = -\frac {\coth (c+d x) \text {csch}(c+d x)}{2 a d \left (a+b-b \text {sech}^2(c+d x)\right )}-\frac {b \text {sech}(c+d x)}{a^2 d \left (a+b-b \text {sech}^2(c+d x)\right )}-\frac {(a+4 b) \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\text {sech}(c+d x)\right )}{2 a^3 d}-\frac {(b (3 a+4 b)) \text {Subst}\left (\int \frac {1}{a+b-b x^2} \, dx,x,\text {sech}(c+d x)\right )}{2 a^3 d} \\ & = \frac {(a+4 b) \text {arctanh}(\cosh (c+d x))}{2 a^3 d}-\frac {\sqrt {b} (3 a+4 b) \text {arctanh}\left (\frac {\sqrt {b} \text {sech}(c+d x)}{\sqrt {a+b}}\right )}{2 a^3 \sqrt {a+b} d}-\frac {\coth (c+d x) \text {csch}(c+d x)}{2 a d \left (a+b-b \text {sech}^2(c+d x)\right )}-\frac {b \text {sech}(c+d x)}{a^2 d \left (a+b-b \text {sech}^2(c+d x)\right )} \\ \end{align*}

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 5.85 (sec) , antiderivative size = 221, normalized size of antiderivative = 1.57 \[ \int \frac {\text {csch}^3(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^2} \, dx=-\frac {\frac {4 i \sqrt {b} (3 a+4 b) \arctan \left (\frac {-i \sqrt {a+b}-\sqrt {a} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {b}}\right )}{\sqrt {a+b}}+\frac {4 i \sqrt {b} (3 a+4 b) \arctan \left (\frac {-i \sqrt {a+b}+\sqrt {a} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {b}}\right )}{\sqrt {a+b}}+\frac {8 a b \cosh (c+d x)}{a-b+(a+b) \cosh (2 (c+d x))}+a \text {csch}^2\left (\frac {1}{2} (c+d x)\right )-4 (a+4 b) \log \left (\cosh \left (\frac {1}{2} (c+d x)\right )\right )+4 (a+4 b) \log \left (\sinh \left (\frac {1}{2} (c+d x)\right )\right )+a \text {sech}^2\left (\frac {1}{2} (c+d x)\right )}{8 a^3 d} \]

[In]

Integrate[Csch[c + d*x]^3/(a + b*Tanh[c + d*x]^2)^2,x]

[Out]

-1/8*(((4*I)*Sqrt[b]*(3*a + 4*b)*ArcTan[((-I)*Sqrt[a + b] - Sqrt[a]*Tanh[(c + d*x)/2])/Sqrt[b]])/Sqrt[a + b] +
 ((4*I)*Sqrt[b]*(3*a + 4*b)*ArcTan[((-I)*Sqrt[a + b] + Sqrt[a]*Tanh[(c + d*x)/2])/Sqrt[b]])/Sqrt[a + b] + (8*a
*b*Cosh[c + d*x])/(a - b + (a + b)*Cosh[2*(c + d*x)]) + a*Csch[(c + d*x)/2]^2 - 4*(a + 4*b)*Log[Cosh[(c + d*x)
/2]] + 4*(a + 4*b)*Log[Sinh[(c + d*x)/2]] + a*Sech[(c + d*x)/2]^2)/(a^3*d)

Maple [A] (verified)

Time = 2.45 (sec) , antiderivative size = 187, normalized size of antiderivative = 1.33

method result size
derivativedivides \(\frac {\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{8 a^{2}}-\frac {1}{8 a^{2} \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+\frac {\left (-2 a -8 b \right ) \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 a^{3}}+\frac {2 b \left (\frac {\left (-\frac {a}{2}-b \right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-\frac {a}{2}}{\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a +2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a +4 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b +a}-\frac {\left (3 a +4 b \right ) \operatorname {arctanh}\left (\frac {2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a +2 a +4 b}{4 \sqrt {a b +b^{2}}}\right )}{4 \sqrt {a b +b^{2}}}\right )}{a^{3}}}{d}\) \(187\)
default \(\frac {\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{8 a^{2}}-\frac {1}{8 a^{2} \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+\frac {\left (-2 a -8 b \right ) \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 a^{3}}+\frac {2 b \left (\frac {\left (-\frac {a}{2}-b \right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-\frac {a}{2}}{\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a +2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a +4 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b +a}-\frac {\left (3 a +4 b \right ) \operatorname {arctanh}\left (\frac {2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a +2 a +4 b}{4 \sqrt {a b +b^{2}}}\right )}{4 \sqrt {a b +b^{2}}}\right )}{a^{3}}}{d}\) \(187\)
risch \(-\frac {{\mathrm e}^{d x +c} \left (a \,{\mathrm e}^{6 d x +6 c}+2 b \,{\mathrm e}^{6 d x +6 c}+3 a \,{\mathrm e}^{4 d x +4 c}-2 b \,{\mathrm e}^{4 d x +4 c}+3 \,{\mathrm e}^{2 d x +2 c} a -2 b \,{\mathrm e}^{2 d x +2 c}+a +2 b \right )}{d \,a^{2} \left (a \,{\mathrm e}^{4 d x +4 c}+b \,{\mathrm e}^{4 d x +4 c}+2 \,{\mathrm e}^{2 d x +2 c} a -2 b \,{\mathrm e}^{2 d x +2 c}+a +b \right ) \left ({\mathrm e}^{2 d x +2 c}-1\right )^{2}}+\frac {\ln \left ({\mathrm e}^{d x +c}+1\right )}{2 a^{2} d}+\frac {2 \ln \left ({\mathrm e}^{d x +c}+1\right ) b}{d \,a^{3}}-\frac {\ln \left ({\mathrm e}^{d x +c}-1\right )}{2 a^{2} d}-\frac {2 \ln \left ({\mathrm e}^{d x +c}-1\right ) b}{d \,a^{3}}+\frac {3 \sqrt {\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {\left (a +b \right ) b}\, {\mathrm e}^{d x +c}}{a +b}+1\right )}{4 \left (a +b \right ) d \,a^{2}}+\frac {\sqrt {\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {\left (a +b \right ) b}\, {\mathrm e}^{d x +c}}{a +b}+1\right ) b}{\left (a +b \right ) d \,a^{3}}-\frac {3 \sqrt {\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 \sqrt {\left (a +b \right ) b}\, {\mathrm e}^{d x +c}}{a +b}+1\right )}{4 \left (a +b \right ) d \,a^{2}}-\frac {\sqrt {\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 \sqrt {\left (a +b \right ) b}\, {\mathrm e}^{d x +c}}{a +b}+1\right ) b}{\left (a +b \right ) d \,a^{3}}\) \(435\)

[In]

int(csch(d*x+c)^3/(a+b*tanh(d*x+c)^2)^2,x,method=_RETURNVERBOSE)

[Out]

1/d*(1/8*tanh(1/2*d*x+1/2*c)^2/a^2-1/8/a^2/tanh(1/2*d*x+1/2*c)^2+1/4/a^3*(-2*a-8*b)*ln(tanh(1/2*d*x+1/2*c))+2*
b/a^3*(((-1/2*a-b)*tanh(1/2*d*x+1/2*c)^2-1/2*a)/(tanh(1/2*d*x+1/2*c)^4*a+2*tanh(1/2*d*x+1/2*c)^2*a+4*tanh(1/2*
d*x+1/2*c)^2*b+a)-1/4*(3*a+4*b)/(a*b+b^2)^(1/2)*arctanh(1/4*(2*tanh(1/2*d*x+1/2*c)^2*a+2*a+4*b)/(a*b+b^2)^(1/2
))))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 3368 vs. \(2 (132) = 264\).

Time = 0.35 (sec) , antiderivative size = 6335, normalized size of antiderivative = 44.93 \[ \int \frac {\text {csch}^3(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^2} \, dx=\text {Too large to display} \]

[In]

integrate(csch(d*x+c)^3/(a+b*tanh(d*x+c)^2)^2,x, algorithm="fricas")

[Out]

Too large to include

Sympy [F]

\[ \int \frac {\text {csch}^3(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^2} \, dx=\int \frac {\operatorname {csch}^{3}{\left (c + d x \right )}}{\left (a + b \tanh ^{2}{\left (c + d x \right )}\right )^{2}}\, dx \]

[In]

integrate(csch(d*x+c)**3/(a+b*tanh(d*x+c)**2)**2,x)

[Out]

Integral(csch(c + d*x)**3/(a + b*tanh(c + d*x)**2)**2, x)

Maxima [F]

\[ \int \frac {\text {csch}^3(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^2} \, dx=\int { \frac {\operatorname {csch}\left (d x + c\right )^{3}}{{\left (b \tanh \left (d x + c\right )^{2} + a\right )}^{2}} \,d x } \]

[In]

integrate(csch(d*x+c)^3/(a+b*tanh(d*x+c)^2)^2,x, algorithm="maxima")

[Out]

((a*e^(7*c) + 2*b*e^(7*c))*e^(7*d*x) + (3*a*e^(5*c) - 2*b*e^(5*c))*e^(5*d*x) + (3*a*e^(3*c) - 2*b*e^(3*c))*e^(
3*d*x) + (a*e^c + 2*b*e^c)*e^(d*x))/(4*a^2*b*d*e^(6*d*x + 6*c) + 4*a^2*b*d*e^(2*d*x + 2*c) - a^3*d - a^2*b*d -
 (a^3*d*e^(8*c) + a^2*b*d*e^(8*c))*e^(8*d*x) + 2*(a^3*d*e^(4*c) - 3*a^2*b*d*e^(4*c))*e^(4*d*x)) + 1/2*(a + 4*b
)*log((e^(d*x + c) + 1)*e^(-c))/(a^3*d) - 1/2*(a + 4*b)*log((e^(d*x + c) - 1)*e^(-c))/(a^3*d) + 8*integrate(1/
8*((3*a*b*e^(3*c) + 4*b^2*e^(3*c))*e^(3*d*x) - (3*a*b*e^c + 4*b^2*e^c)*e^(d*x))/(a^4 + a^3*b + (a^4*e^(4*c) +
a^3*b*e^(4*c))*e^(4*d*x) + 2*(a^4*e^(2*c) - a^3*b*e^(2*c))*e^(2*d*x)), x)

Giac [F]

\[ \int \frac {\text {csch}^3(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^2} \, dx=\int { \frac {\operatorname {csch}\left (d x + c\right )^{3}}{{\left (b \tanh \left (d x + c\right )^{2} + a\right )}^{2}} \,d x } \]

[In]

integrate(csch(d*x+c)^3/(a+b*tanh(d*x+c)^2)^2,x, algorithm="giac")

[Out]

sage0*x

Mupad [F(-1)]

Timed out. \[ \int \frac {\text {csch}^3(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^2} \, dx=\int \frac {1}{{\mathrm {sinh}\left (c+d\,x\right )}^3\,{\left (b\,{\mathrm {tanh}\left (c+d\,x\right )}^2+a\right )}^2} \,d x \]

[In]

int(1/(sinh(c + d*x)^3*(a + b*tanh(c + d*x)^2)^2),x)

[Out]

int(1/(sinh(c + d*x)^3*(a + b*tanh(c + d*x)^2)^2), x)